import React,{useState} from 'react'

export default function App() {
const [name,setName] = useState("xumin")
const [age,setAge] = useState(20)

  return (
    <div>
        <div>{name}</div>
        <div>{age}</div>
        <button onClick={()=>{
            setName("cheng")
            setAge(50)
        }}>修改</button>
    </div>
    
  )
}
